/*
 * miniFreeRTOS SOC System emulation.
 *
 * Copyright (c) 2024- yanl1229@163.com.
 * Written by yanl1229
 *
 * This code is licensed under the GPL.
 */
#ifndef SIGNAL_H
#define SIGNAL_H

#include "list.h"
#include "task.h"
#include "signal.h"

/*
 * 消息队列管理结构
 */
struct signal
{
    volatile int signal_pending;
    void (*action)(void *ptr);
     void *ptr;

};

/**
 * 创建信号
 */
struct signal* signal_create(char *name, void (*action)(void *ptr), void *ptr);
/**
 * 删除信号
 */
extern void signal_delete(struct signal *sg);
/**
 * 发送
 */
extern void signal_send(struct signal * sg);

#endif